﻿using System;
using Microsoft.Extensions.Options;

namespace _066.配置系统
{
	public class TestController
	{
		public readonly IOptionsSnapshot<Config> optConfig;

		public TestController(IOptionsSnapshot<Config> optConfig)
		{
			// this.optConfig = optConfig.Value;
			this.optConfig = optConfig;
		}

		public void Test()
		{
			var config = optConfig.Value;
			Console.WriteLine(config.Age);
			Console.WriteLine("*************");
			Console.WriteLine(config.Age);
		}
	}
}